package cn.puge.mertisfront.controller;


import cn.puge.commonutils.R;
import cn.puge.mertisfront.entity.PugeTeamFzr;
import cn.puge.mertisfront.service.PugeTeamFzrService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author LIJW
 * @since 2020-08-29
 */
@RestController
@RequestMapping("/mertisfront/puge-team-fzr")
@CrossOrigin
public class PugeTeamFzrController {

    @Autowired
    private PugeTeamFzrService pugeTeamFzrService;
    
    //查询所有负责人(包括团队)
    @GetMapping("getAllTeamPrincipal")
    public R getAllTeamPrincipal(){


        QueryWrapper<PugeTeamFzr> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("rank");
        List<PugeTeamFzr> list = pugeTeamFzrService.list(queryWrapper);

        return R.ok().data("list",list);
    }


}

